package com.zyl.javabasic.动态代理.demo;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy; /**
 * @author zyl
 * @description
 * @since 2025/5/8
 */
public class demo {
    public static void main(String[] args) {
        // 使用示例
        UserServiceImpl userService = new UserServiceImpl();
        UserService proxy = (UserService) new UserServiceProxy().getProxy(userService);
        proxy.addUser("张三");
    }
}

